<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"  %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"  %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>查询商品列表</title>
<% request.setCharacterEncoding("utf-8"); %> 
<script type="text/javascript">
function batchSubmitItems(){
	document.itemsAction.action="${pageContext.request.contextPath}/item/batchSubmitItems.action";
	document.itemsAction.submit();
}
</script>
</head>
<body>
	<form name="itemsAction" action="${pageContext.request.contextPath}/item/batchUpdatePage.action" method="post">
	    查询条件：
		<table width="100%" border="1">
		
			<tr>			   
				<td>				
					<input type="button" value="批量更新文件" onclick="batchSubmitItems()" >
				</td>
			</tr>
		</table>
		商品列表：
		<table border="1">
			<tr><td>编号</td>
				<td>商品名称</td>
				<td>商品价格</td>
				<td>商品描述</td>
			</tr>
			<c:forEach items="${itemList}" var="items" varStatus="serial">
				<tr>
				<td><input type="text" name="listItems[${serial.index}].id" value="${items.id}" ></td>
				<td><input type="text" name="listItems[${serial.index}].name" value="${items.name}" ></td>
				<td><input type="text" name="listItems[${serial.index}].price" value="${items.price}" ></td>
				<td><input type="text" name="listItems[${serial.index}].detail" value="${items.detail}" ></td>
				</tr>
			</c:forEach>
		</table>
	</form>
</body>
</html>